//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop

#include "RLCnsMCl.h"
#include "DModule.h"
//---------------------------------------------------------------------------
#pragma package( smart_init )
#pragma link "PHRBand"
#pragma link "PHReport"
#pragma link "PHDS"
#pragma link "PHRLabel"
#pragma resource "*.dfm"
TRLCnsMCI1*  RLCnsMCI1;

//---------------------------------------------------------------------------
__fastcall TRLCnsMCI1::TRLCnsMCI1( TComponent*  Owner ) : TForm( Owner )
{
}

//---------------------------------------------------------------------------
void __fastcall TRLCnsMCI1::PHReport1BeforePrint( TObject*  Sender, bool&  PrintReport )
{
  LBEmpresa->Caption = IntToStr( DM->EmpAc.Codigo ) + "-" + DM->EmpAc.Nome;

  DS1->Open(true);
  DS1->First();
}

//---------------------------------------------------------------------------
void __fastcall TRLCnsMCI1::PHReport1BeforeDetail( PHReport*  Sender )
{
 if(M->Nivel == 0)//Nome do Cliente
  PHRLabel2->Fonte->Bold = true;
 else
  PHRLabel2->Fonte->Bold = false;
 if(M->Nivel != 1 || M->Nivel != 2 || M->Nivel != 6)
   {
   PHRLabel1->Enabled = true;
   PHRLabel5->Enabled = true;
   }
  else
   {
   PHRLabel1->Enabled = false;
   PHRLabel5->Enabled = false;
   }
}
//---------------------------------------------------------------------------
void __fastcall TRLCnsMCI1::DS1AfterOpen(TObject *Sender)
{
 M = ( struct MVCL* ) DS1->Buffer;
}
//---------------------------------------------------------------------------
